Devices including or coupled to one or more digital cameras use a camera lens to focus incoming light onto a camera sensor for capturing digital images. The curvature of a camera lens places a range of depth of the scene in focus. Portions of the scene closer or further than the range of depth may be out of focus, and therefore appear blurry in a captured image. The distance of the camera lens from the camera sensor (the “focal length”) is directly related to the distance of the range of depth for the scene from the camera sensor that is in focus (the “focus distance”). Many devices are capable of adjusting the focal length, such as by moving the camera lens to adjust the distance between the camera lens and the camera sensor, and thereby adjusting the focus distance.
Many devices automatically determine the focal length. For example, a user may touch an area of a preview image provided by the device (such as a person or landmark in the previewed scene) to indicate the portion of the scene to be in focus. In response, the device may automatically perform an autofocus (AF) operation to adjust the focal length so that the portion of the scene is in focus. The device may then use the determined focal length for subsequent image captures (including generating a preview).